/**
 * 
 */
package demo.tellurium.module

import org.telluriumsource.dsl.DslContext;

import demo.tellurium.framework.BaseUIModule;

/**
 * @author roger.xu
 *
 */
public class GoogleSearchModule extends BaseUIModule {
    
    @Override
    public void defineUi() {
        ui.Container(uid: "GoogleSearchModule", clocator: [tag: "td"], group: "true"){
            InputBox(uid: "Input", clocator: [title: "Google Search"])
            SubmitButton(uid: "Search", clocator: [name: "btnG", value: "Google Search"])
            SubmitButton(uid: "ImFeelingLucky", clocator: [value: "I'm Feeling Lucky"])
        }
    }
    
    public void doSearch(String input) {
        type "GoogleSearchModule.Input", "Tellurium test"
        click "GoogleSearchModule.Search"
        waitForPageToLoad 30000
    }
}
